import { singleton } from "tsyringe";
import { RobotAppPage } from "../../page";

@singleton()
export class AlertDialog extends RobotAppPage {
    title: string = `系统弹框`
    private isRuning: boolean = false;
    dispose(): void { 
    }
    is(packageName: string): boolean {
        return `com.miui.securitycenter` === packageName;
    }
    accept(activityName: string): boolean {
        return `miuix.appcompat.app.AlertDialog` === activityName;
    }
    in(): boolean {
        if(this.isRuning) return;
        this.isRuning = true;
        log(`BrowserActivity In`)
        return true;
    }
    out(): boolean {
        this.isRuning = false;
        log(`BrowserActivity Out`)
        return true;
    }
}
